//无缓冲的channel  由于c是无缓冲的channel，因此必须保证取操作<-c 先于放操作c<- 0
package main

import (
	"time"
)

var a string
var c = make(chan int)

func f() {
	a = "hello, world"
	//time.Sleep(3 * time.Second)
	println(<-c)
}

func main() {
	go f()
	time.Sleep(3 * time.Second)
	c <- 0
	println(a)

}
